#ifndef APPLYFRIENDREQUESTMESSAGETOSERVER_H
#define APPLYFRIENDREQUESTMESSAGETOSERVER_H

#include "./entities/message/superClass/message.h"

/*
Json数据格式
{
    "messageType": [ApplyFriendRequestToServer](int)
    "userId": [userId](string)
    "friendId": [friendId](string)
    "alias": [alias](string)
    "verifyInfo": [verifyInfo](string)
}
*/
class ApplyFriendRequestMessageToServer : public Message
{
public:
    ApplyFriendRequestMessageToServer() = delete;

    ApplyFriendRequestMessageToServer(const UserId& userId, const FriendId& friendId,
                                      const Alias& alias, const VerifyInfo& verifyInfo);
    ApplyFriendRequestMessageToServer(const QJsonObject&);
    QJsonObject PackJsonData() const override;
    UserId getUserId() const;
    FriendId getFriendId() const;
    Alias getAlias() const;
    VerifyInfo getVerifyInfo() const;

private:
    UserId m_userId;
    FriendId m_friendId;
    Alias m_alias;
    VerifyInfo m_verifyInfo;
};

// 编译时注册
Q_DECLARE_METATYPE(ApplyFriendRequestMessageToServer)

#endif // APPLYFRIENDREQUESTMESSAGETOSERVER_H
